﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace Word.Editor.Doc
{
    /// <summary>
    /// The FibRgLw97 structure is the third section of the FIB. This contains an array of 4-byte values.
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct FibRgLw97
    {
        /// <summary>
        /// Specifies the count of bytes of those written to the WordDocument stream of the file that have any meaning.
        /// All bytes in the WordDocument stream at offset cbMac and greater MUST be ignored.
        /// </summary>
        public UInt32 cbMac;
        public UInt32 reserved1;
        public UInt32 reserved2;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the main document. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpText;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the footnote subdocument. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpFtn;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the header subdocument. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpHdd;
        public Int32 reserved3;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the comment subdocument. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpAtn;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the endnote subdocument. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpEdn;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the textbox subdocument of the main document. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpTxbx;
        /// <summary>
        /// A signed integer that specifies the count of CPs in the textbox subdocument of the header. This value MUST be zero, 1, or greater.
        /// </summary>
        public Int32 ccpHdrTxbx;
        public UInt32 reserved4;
        public UInt32 reserved5;
        /// <summary>
        /// This value MUST be equal or less than the number of data elements in PlcBteChpx, as specified by FibRgFcLcb97.fcPlcfBteChpx and FibRgFcLcb97.lcbPlcfBteChpx. This value MUST be ignored.
        /// </summary>
        public UInt32 reserved6;
        public UInt32 reserved7;
        public UInt32 reserved8;
        /// <summary>
        /// This value MUST be less than or equal to the number of data elements in PlcBtePapx, as specified by FibRgFcLcb97.fcPlcfBtePapx and FibRgFcLcb97.lcbPlcfBtePapx. This value MUST be ignored.
        /// </summary>
        public UInt32 reserved9;
        public UInt32 reserved10;
        public UInt32 reserved11;
        public UInt32 reserved12;
        public UInt32 reserved13;
        public UInt32 reserved14;
    }
}
